package cn.uway.dao.demo;


import cn.uway.dao.IBaseDao;
import cn.uway.pojo.demo.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserDao {
	
	@Autowired
	private IBaseDao<?> baseDaoImpl;
	
	private String FIND_USER_INFO = "UserInfo.findUserInfo";
	
	private String LOGIN = "UserInfo.login";
	
	public UserInfo findUserInfo(String userid) {
		UserInfo rsltUser = (UserInfo) baseDaoImpl.selectOne(FIND_USER_INFO, userid);
		return rsltUser;
	}
	
	public UserInfo login(UserInfo user) {
		UserInfo rsltUser =  (UserInfo)baseDaoImpl.selectOne(LOGIN, user);
		return rsltUser;
	}

}
